# -*- coding: utf-8 -*-
"""
@Time : 2024/3/6 8:42 PM
@Author: imamhusan
@Des: TCP 客户端
"""

import socket


client_socket = socket.socket()

client_socket.connect(('192.168.1.156', 1128))

while True:
    # 发送信息
    send_msg = input('请输入发送内容：')
    client_socket.sendall(send_msg.encode())

    # 接收信息
    data = client_socket.recv(1024).decode()
    print(f'服务端回复内容：{data}')


